Skip to content

Fix mixed code precompiled libraries #611

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
May 8, 2020

Conversation

facchinm
Copy link
Member

@facchinm facchinm commented Mar 10, 2020

This patch restores some functionalities broken by #512 .
It introduces a BREAKING CHANGE to "precompiled" field
Changes are backwards compatible with the exception of what we now call "full" precompiled libraries (a library which contains a precompiled archive and the same source code as fallback)

If merged, "precompiled" means that the library ONLY contains a precompiled library and its headers.
No file containing implementation will be compiled if the library is specified as such.

Fixes arduino/arduino-builder#353

Tested with

facchinm and others added 5 commits May 5, 2020 00:04
This patch restores some functionalities broken by arduino#512 .
It introduces a BREAKING CHANGE to "precompiled" field

If merged, "precompiled" means that the library ONLY contains a precompiled library and its headers.
No file containing implementation will be compiled if the library is specified as such.

Fixes arduino/arduino-builder#353

Tested with
* arduino#512 (comment) (Nano33BLE and generic MKR board)
* https://github.com/BoschSensortec/BSEC-Arduino-library (works after removing precompiled=true directive in library.properties)
* https://github.com/vidor-libraries/USBBlaster (MKRVidor, fully precompiled)
@cmaglie cmaglie force-pushed the fix_precompiled_again branch 2 times, most recently from b167b68 to 698107b Compare May 5, 2020 16:50
Copy link
Member Author

@facchinm facchinm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, the comment is about a particular commit but everything gets squashed so it's not a problem (I'm still against this practice for this kind of PR - code + test)

cmaglie added 8 commits May 7, 2020 10:45
This flag allow the deployment of a pure precompiled library that ships
also the source code of the precompiled part.
This allows to possibly compile-from-source as a fallback if the library
does not provide a precompiled build for the current architecture.

The "precompiled=true" instead has been ported back to the old behaviour
(for libraries that ships a precompiled binary and support source code
that wraps/uses the precompiled part).
@cmaglie cmaglie force-pushed the fix_precompiled_again branch from 698107b to 8cd543d Compare May 7, 2020 08:52
@cmaglie cmaglie merged commit 1c7920f into arduino:master May 8, 2020
@cmaglie cmaglie added this to the 0.11.0 milestone May 8, 2020
tensorflow-copybara pushed a commit to tensorflow/tensorflow that referenced this pull request Jun 18, 2020
Precompilation allows Arduino users to build their sketches much faster, but requires some support from the library properties to enable. This has recently been upgraded to suppor the 'full' mode, as shown in arduino/arduino-cli#611, so we want to take advantage of this.

PiperOrigin-RevId: 317191283
Change-Id: Ie44a31ba45105f65fdad0da487290aff5fa2a179
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"Improve precompiled libraries handling" broke "mixed code" libraries
3 participants